/**
  * @description: 订单列表中的订单元素
  * @author: yingying.fan
  * @date: 2019/2/25 17:02
  */
import React from 'react'
import { StyleSheet } from 'react-native'
import { px2dp } from 'rn-xiaobu-utils'
import OrderItem from '../orderlist/OrderItem'
import DetailOrderStoreItem from '../orderdetail/DetailOrderStoreItem'

export default class DetailOrderItem extends OrderItem {
  static defaultProps = {
    orderIndex: 0,
    orderInfo: {}
  }

  constructor (props) {
    super(props)
    this.state = {}
  }

  _getStoreItem = (storeInfo, index, stateDesc) => {
    return (
      <DetailOrderStoreItem
        key={'store' + index}
        orderState={stateDesc}
        storeInfo={storeInfo}
      />
    )
  }

  _getOrderOpBtns = () => {
    return null
  }

  _getOrderStyle = () => {
    return styles.orderMargin
  }
}

const styles = StyleSheet.create({
  orderMargin: {
    marginVertical: px2dp(16)
  }
})